﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            //一
            Random ran = new Random();
            int[] arr = new int[10];
            
            for (int i = 0; i < arr.Length; i++)
            {
                arr[i] = ran.Next(1, 11);
                if (i > 0)
                {
                    for (int j = 0; j < i; j++)
                    {
                        if (arr[i] == arr[j])
                        {
                            i--;
                        }
                    }
                }
            }
            for (int i = 0; i < arr.Length; i++)
            {
                Console.Write(arr[i] + " ");
            }
            Console.WriteLine("\n");

            //二
            double num2 = ran.NextDouble();
            Console.WriteLine(num2.ToString("f2"));
            //三
            double num3 = (ran.NextDouble() * 3) + 4;
            Console.WriteLine(num3.ToString("f2"));
            //四
            Regex regex = new Regex(@"^\w+(\.\w)?@\w+(\.\w)+$");
            string input = Console.ReadLine();
            Console.WriteLine(regex.IsMatch(input));
            //五
            regex = new Regex(@"^1[3-9]{1}\d{9}$");
            string input2 = Console.ReadLine();
            Console.WriteLine(regex.IsMatch(input2));
            }
        }
    }

